.app {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.game-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px;
  text-align: center;
}

.title {
  font-size: 3rem;
  color: #333;
  margin-bottom: 30px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status-bar {
  margin-bottom: 25px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-selector {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 25px;
}

.mode-btn {
  padding: 10px 25px;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid #ddd;
  border-radius: 25px;
  background: white;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-btn:hover {
  border-color: #667eea;
  color: #667eea;
  transform: translateY(-2px);
}

.mode-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.color-selector {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 15px;
}

.color-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #555;
}

.color-btn {
  padding: 10px 20px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid #ddd;
  border-radius: 20px;
  background: white;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
}

.color-btn:hover {
  border-color: #4CAF50;
  color: #4CAF50;
  transform: translateY(-2px);
}

.color-btn.active {
  background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.current-player {
  font-size: 1.4rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-indicator {
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.player-indicator.black {
  background: linear-gradient(135deg, #434343 0%, #000000 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.player-indicator.white {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  color: #333;
  border: 2px solid #ddd;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.winner-message {
  font-size: 2rem;
  font-weight: bold;
  color: #4CAF50;
  animation: celebrate 0.6s ease-in-out;
}

@keyframes celebrate {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.board-wrapper {
  display: inline-block;
  background: linear-gradient(135deg, #E8D4B8 0%, #D9C4A8 100%);
  padding: 30px;
  border-radius: 10px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 30px;
}

.board {
  position: relative;
  display: inline-block;
  width: 540px;
  height: 540px;
}

.board-svg {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1;
}

.board-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.board-row {
  display: flex;
  margin: 0;
  padding: 0;
}

.cell {
  width: 36px;
  height: 36px;
  position: relative;
  cursor: pointer;
}

.cell:hover {
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, transparent 60%);
}

.piece {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: placepiece 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

@keyframes placepiece {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.piece.black {
  background: radial-gradient(circle at 30% 30%, #666, #000);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5), inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.piece.white {
  background: radial-gradient(circle at 30% 30%, #fff, #ddd);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

.last-move-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  position: absolute;
}

.piece.black .last-move-marker {
  background: #ff4444;
}

.piece.white .last-move-marker {
  background: #ff4444;
}

.controls {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-bottom: 25px;
}

.btn {
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn-undo {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.btn-restart {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.info {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  text-align: left;
  margin-top: 20px;
}

.info p {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.info ul {
  list-style: none;
  padding-left: 0;
}

.info li {
  padding: 8px 0;
  color: #666;
  font-size: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.info li:last-child {
  border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .game-container {
    padding: 20px;
  }

  .title {
    font-size: 2rem;
  }

  .cell {
    width: 28px;
    height: 28px;
  }

  .piece {
    width: 24px;
    height: 24px;
  }

  .board {
    padding: 10px;
  }

  .controls {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
